/*
*  Copyright (C) 2009  Peter Kist & Jan Ripke
*
*  This program is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/** \file
* This file contains type definitions used by the core module
*/
#ifndef __core_types_h
#define __core_types_h 1


namespace galaxy {
    namespace core {

        /** \typedef Real
        * A Real models either a single or double precision floating point number. The flavor is choosen at
        * compile time (using define GALAXY_DOUBLE_PRECISION).
        */
#if GALAXY_DOUBLE_PRECISION == 1
        typedef double Real;
#else
        typedef float Real;
#endif

        /**
        * The interface to threading information such as the state of a thread.
        */
        class Thread {
        public:

            /** The state of the thread */
            typedef enum _thread_state {
                THREAD_STATE_UNKNOWN        = 0, /**< not initialized */
                THREAD_STATE_RUNNING        = 1, /**< running */
                THREAD_STATE_STOP_REQUESTED = 2, /**< running but shutdown was requested */
                THREAD_STATE_STOPPED        = 3, /**< processing stopped */
            } State;
        };

    } // namespace core
} // namespace galaxy

#endif // __core_types_h
